//=============================================================
// 创建人:            ssd
// 创建时间:          8/17/2024 2:42:40 PM
// 邮箱：             1292934053@qq.com
//==============================================================
using LF.Domain.Entities;
using LF.Domain;
using LF.Common;
using System.Linq.Expressions;

namespace LF.Domain.Services
{
    public interface IChinaManagerService: IDomainService
    {
        List<China> All(int index, int pageSize,string? key);
        long Count(string? key);
        China Get(int id);
        List<China> List(Expression<Func<China, bool>>? where = null);
        bool Insert(China china);
        bool Update(China china);
        China GetProvinceByCode(string code);
        
        China GetCityByCode(string provincecode,string citycode);
        China GetDistrictByCode(string provincecode, string citycode,string areacode);

        Common.ChinaDistrict GetAddressInfo(int id);
        /// <summary>
        /// 省列表
        /// </summary>
        /// <returns></returns>
        List<China> Province();
        /// <summary>
        /// 市列表
        /// </summary>
        /// <returns></returns>
        List<China> City(string province);
        /// <summary>
        /// 区列表
        /// </summary>
        /// <returns></returns>
        List<China> Area(string province,string city);
        /// <summary>
        /// 县/镇/乡列表
        /// </summary>
        /// <returns></returns>
        List<China> Town(string province,string city, string area);
        /// <summary>
        /// 获取地址长名称
        /// </summary>
        /// <returns></returns>
        string GetInfo(int id,AddrType type);
    }
}